#!/bin/sh
echo "首先准备数据的配置变量"
db2="dw01"
t1="dw_cust_info"  #dw客户业务信息表
echo "创建dw层的客户业务信息表"
c_dw="create table if not exists ${db2}.${t1}(
dw_cust_id int,
dw_cust_name string,
dw_amt DECIMAL,
dw_dt string,
dw_phone string,
dw_acctno int,
dw_code_id int,
dw_code_type string,
dw_code_comment string,
dw_org_id int,
dw_org_name string,
dw_org_level string,
dw_org_addr string,
dw_etl_time timestamp
)
row format delimited fields terminated by ',';"
#使用hive指令进行创建
echo "$c_dw"|hive
echo $?
echo "创建dw层的客户业务信息表已创建完成"